package cn.gson.springboot.model.mapper;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.alibaba.fastjson.JSONArray;
@Mapper
public interface OpreArrangeMappers {

	//新增手术安排表
	public void AddOpreArrange(@Param("operationroom_id") Integer roomid,
			@Param("user_id") Integer userid,
			@Param("use_user_id") Integer useruid,
			@Param("operationtype_id") Integer typeid,
			@Param("hosp_id") String hospid,
			@Param("operation_reason") String opreason,
			@Param("oparrange_starttime") String stime,
			@Param("oparrange_endtime") String etime,
			@Param("oparrange_money") BigDecimal fumoney,
			@Param("oparrange_date") Date opdate);
	
	//查询未进行手术的手术安排
	public JSONArray selectArrangeStatusAll();
	
	//修改手术安排的状态
	public void updatearrangestatus(@Param("oparrangestate")Integer oparrangestate,
			@Param("operationid")Integer operationid);
	
	//修改手术安排的预估金额为零
	public void updatearrangemoney(@Param("operationid")Integer operationid);
	
	//查询这一天的时间段是否已存在
	public JSONArray selectArrangeTime(@Param("endtime") String endtime,
			@Param("startime")String startime,
			@Param("opdate")Date opdate);
	
	//查询手术记录
	public JSONArray selectRecordAll();
		
	
	//查询手术的类型
	public JSONArray selectOpreateTypeAll(@Param("oprid")Integer oprid);
	
	//查询手术室
	public JSONArray selectOpreateRoomAll();
	
	//新增手术项目
	public  void AddOperationType(@Param("operationtype_name")String typename,
			@Param("operationroom_id")Integer roomid,
			@Param("operationtype_price")BigDecimal typeprice);
	
 }
